:root {
    --primary-color: #1890ff;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --danger-color: #ff4d4f;
    --text-color: #333;
    --text-secondary: #666;
    --border-color: #f0f0f0;
    --sidebar-width: 250px;
    --header-height: 60px;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f0f2f5;
    color: var(--text-color);
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: var(--sidebar-width);
    background: #001529;
    color: #fff;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    font-size: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.sidebar-header i {
    margin-right: 10px;
    color: var(--primary-color);
}

.menu-group {
    margin-bottom: 20px;
}

.menu-title {
    padding: 12px 24px;
    color: rgba(255,255,255,0.65);
    font-size: 14px;
    display: flex;
    align-items: center;
}

.menu-title i {
    margin-right: 10px;
}

.menu-items {
    list-style: none;
}

.menu-items li {
    padding: 12px 24px 12px 48px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.menu-items li i {
    margin-right: 10px;
    width: 16px;
}

.menu-items li:hover {
    background: rgba(255,255,255,0.1);
    color: var(--primary-color);
}

.menu-items li.active {
    background: var(--primary-color);
    color: #fff;
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 20px;
}

.top-bar {
    height: var(--header-height);
    background: #fff;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--card-shadow);
    border-radius: 4px;
    margin-bottom: 24px;
}

.weather-info {
    display: flex;
    align-items: center;
    gap: 32px;
}

.weather-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.weather-item i {
    font-size: 24px;
    color: var(--primary-color);
}

.weather-data {
    display: flex;
    flex-direction: column;
}

.weather-data .label {
    font-size: 12px;
    color: var(--text-secondary);
}

.weather-data .value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.user-profile:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.user-profile i {
    font-size: 20px;
    color: var(--text-secondary);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.weather-widget {
    display: flex;
    align-items: center;
    gap: 8px;
}

.weather-widget .divider {
    color: #ddd;
    margin: 0 8px;
}

/* 状态卡片样式 */
.status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.status-card {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(24,144,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-color);
}

.status-info h3 {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.status-value {
    font-size: 24px;
    font-weight: bold;
}

.unit {
    font-size: 14px;
    color: var(--text-secondary);
    margin-left: 4px;
}

/* 控制面板样式 */
.control-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.section-header {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.control-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.control-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.control-header i {
    color: var(--primary-color);
}

.control-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    background: #f5f5f5;
    color: var(--text-secondary);
    font-size: 14px;
}

.control-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.control-btn:hover {
    background: #40a9ff;
}

/* 图表区域样式 */
.chart-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.chart-container {
    height: 400px;
}

/* 设置区域样式 */
.settings-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 24px;
}

.settings-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.setting-item {
    margin-top: 16px;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.threshold-control {
    display: flex;
    align-items: center;
    gap: 16px;
}

input[type="range"] {
    flex: 1;
    height: 4px;
    background: #e1e1e1;
    border-radius: 2px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.threshold-value {
    min-width: 48px;
    text-align: right;
    color: var(--text-secondary);
}

/* 土壤墒情监测面板样式 */
.soil-monitoring-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.soil-monitoring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.monitoring-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.monitoring-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.time-selector select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
    color: var(--text-color);
    cursor: pointer;
}

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 6px;
    background: #fff8f0;
    border: 1px solid #ffd591;
}

.alert-item.warning i {
    color: var(--warning-color);
    font-size: 20px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: bold;
    margin-bottom: 4px;
}

.alert-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.alert-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 添加预警类型样式 */
.alert-item.info {
    background: #e6f7ff;
    border-color: #91d5ff;
}

.alert-item.info i {
    color: var(--primary-color);
}

.alert-item.warning {
    background: #fff8f0;
    border-color: #ffd591;
}

/* 添加面板切换动画 */
.soil-monitoring-panel, .status-cards, .control-section, .chart-section, .settings-section {
    transition: opacity 0.3s ease-in-out;
}

/* 添加图表加载动画 */
.chart-container {
    position: relative;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: none;
}

.chart-container.loading::before {
    display: block;
}

/* 实时墒情面板样式 */
.real-time-moisture-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.moisture-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.overview-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
}

.overview-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(24,144,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-color);
}

.overview-info h3 {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.overview-value {
    font-size: 24px;
    font-weight: bold;
}

.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.monitoring-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.monitoring-card.full-width {
    grid-column: 1 / -1;
}

.data-table {
    margin-top: 16px;
    overflow-x: auto;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: #fafafa;
    font-weight: 500;
    color: var(--text-secondary);
}

.data-table tbody tr:hover {
    background: #fafafa;
}

.area-selector select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
    color: var(--text-color);
    cursor: pointer;
}

/* 状态标签样式 */
.status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.status-tag.normal {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

.status-tag.warning {
    background: #fff7e6;
    border: 1px solid #ffd591;
    color: #faad14;
}

.status-tag.danger {
    background: #fff1f0;
    border: 1px solid #ffa39e;
    color: #ff4d4f;
}

/* 面板基础样式 */
.device-status-panel,
.real-time-moisture-panel,
.soil-monitoring-panel {
    width: 100%;
}

/* 确保图表容器有正确的高度 */
.chart-container {
    height: 400px;
    width: 100%;
    position: relative;
}

/* 调整监控网格布局 */
.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.monitoring-card.full-width {
    grid-column: 1 / -1;
}

/* 确保表格正确显示 */
.data-table {
    width: 100%;
    overflow-x: auto;
    margin-top: 16px;
}

/* 调整概览卡片布局 */
.moisture-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

/* 墒情趋势面板样式 */
.moisture-trend-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.time-range-selector {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.selector-group {
    display: flex;
    gap: 10px;
}

.time-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.time-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.custom-date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-date-range input[type="date"] {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.apply-btn {
    padding: 6px 16px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.trend-charts {
    display: grid;
    gap: 24px;
}

.trend-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.trend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-controls select,
.filter-controls select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.stats-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stats-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(24,144,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-color);
}

.stats-info {
    flex: 1;
}

.stats-info h3 {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.stats-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 4px;
}

.stats-change {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stats-change.increase {
    color: #52c41a;
}

.stats-change.decrease {
    color: #ff4d4f;
}

.stats-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 分层监测面板样式 */
.layered-monitoring-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.layer-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.layer-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.layer-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(24,144,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-color);
}

.layer-info {
    flex: 1;
}

.layer-info h3 {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.layer-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

.layer-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.layer-status.normal {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

.layer-status.warning {
    background: #fff7e6;
    border: 1px solid #ffd591;
    color: #faad14;
}

.layer-status.danger {
    background: #fff1f0;
    border: 1px solid #ffa39e;
    color: #ff4d4f;
}

.layer-charts {
    display: grid;
    gap: 24px;
}

.chart-controls {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group label {
    color: var(--text-secondary);
}

.control-group select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
}

.chart-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.time-selector {
    display: flex;
    gap: 8px;
}

.time-btn {
    padding: 4px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.time-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.data-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.export-btn:hover {
    background: #f5f5f5;
}

/* 区域分布面板样式 */
.area-distribution-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.distribution-charts {
    display: grid;
    gap: 24px;
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.heatmap-container {
    height: 500px;
    width: 100%;
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.area-stats {
    padding: 16px;
}

.area-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.area-stat-card {
    background: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 16px;
}

.area-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.area-stat-title {
    font-weight: 500;
    color: var(--text-color);
}

.area-stat-value {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 8px;
}

.area-stat-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

.filter-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-group select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
}

.action-btn {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

/* 设备状态面板样式 */
.device-status-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.device-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.device-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.device-monitoring {
    display: grid;
    gap: 24px;
}

.params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.param-item {
    background: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

.param-label {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.param-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 16px;
}

.param-chart {
    height: 100px;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.refresh-btn:hover {
    background: #f5f5f5;
}

.refresh-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(24, 144, 255, 0.1);
    transform: translateX(-100%);
}

.refresh-btn.refreshing::after {
    animation: refresh-animation 1s ease-out;
}

@keyframes refresh-animation {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.param-value {
    transition: color 0.3s ease;
}

.param-value.updating {
    color: var(--primary-color);
}

.add-maintenance-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.add-maintenance-btn:hover {
    background: #40a9ff;
}

/* 分析卡片网格布局 */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
}

/* 分析卡片样式 */
.analysis-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* 分析卡片头部样式 */
.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.analysis-header h3 {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.analysis-header h3 i {
    color: var(--primary-color);
}

.analysis-header select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s;
}

.analysis-header select:hover {
    border-color: var(--primary-color);
}

/* 统计数据内容样式 */
.analysis-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-item {
    background: #fafafa;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s;
}

.stat-item:hover {
    background: #f0f5ff;
    transform: translateY(-2px);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-label i {
    font-size: 16px;
    color: var(--primary-color);
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-color);
}

/* 传感器状态监控样式 */
.sensor-status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.status-item {
    background: #fafafa;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s;
}

.status-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.status-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.status-icon.normal {
    background: rgba(82, 196, 26, 0.1);
    color: #52c41a;
}

.status-icon.warning {
    background: rgba(250, 173, 20, 0.1);
    color: #faad14;
}

.status-icon.danger {
    background: rgba(255, 77, 79, 0.1);
    color: #ff4d4f;
}

.status-info {
    flex: 1;
}

.status-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.status-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-color);
}

/* 图表容器样式优化 */
.chart-container {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    height: 240px;
    margin-top: 16px;
}

/* 添加动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.analysis-card {
    animation: fadeIn 0.3s ease-out;
}

/* 添加数值变化动画 */
.stat-value, .status-value {
    transition: all 0.3s;
}

.stat-value.updating, .status-value.updating {
    color: var(--primary-color);
    transform: scale(1.05);
}

/* 预警记录样式 */
.warning-record {
    transition: all 0.3s;
}

.warning-record:hover {
    background-color: #fafafa;
}

.warning-record.critical {
    border-left: 4px solid #ff4d4f;
}

.warning-record.serious {
    border-left: 4px solid #faad14;
}

.warning-record.normal {
    border-left: 4px solid #1890ff;
}

.time-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.primary-time {
    font-weight: 500;
    color: var(--text-color);
}

.secondary-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.warning-type {
    display: flex;
    align-items: center;
    gap: 8px;
}

.warning-type i {
    font-size: 16px;
    color: var(--primary-color);
}

.warning-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.content-text {
    color: var(--text-color);
}

.content-detail {
    font-size: 12px;
    color: var(--text-secondary);
}

.location-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-info i {
    color: var(--text-secondary);
}

.handler-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.handler-info i {
    color: var(--text-secondary);
}

.no-handler {
    color: var(--text-secondary);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 4px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #f5f5f5;
}

.action-btn.primary {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.action-btn.primary:hover {
    background: #40a9ff;
}

.action-btn.warning {
    color: var(--warning-color);
    border-color: var(--warning-color);
}

.action-btn.warning:hover {
    background: #fff7e6;
}

/* 状态标签样式优化 */
.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.status-tag.critical {
    background: #fff1f0;
    border: 1px solid #ffa39e;
    color: #ff4d4f;
}

.status-tag.serious {
    background: #fff7e6;
    border: 1px solid #ffd591;
    color: #faad14;
}

.status-tag.normal {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    color: #1890ff;
}

.status-tag.unprocessed {
    background: #fff1f0;
    border: 1px solid #ffa39e;
    color: #ff4d4f;
}

.status-tag.processing {
    background: #fff7e6;
    border: 1px solid #ffd591;
    color: #faad14;
}

.status-tag.processed {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

/* 图表容器样式优化 */
.chart-container {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 16px;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: none;
}

.chart-container.loading::before {
    display: block;
}

.fault-warning-panel {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.warning-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.warning-records {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 24px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.filters select {
    margin-left: 12px;
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
}

.table-container {
    overflow-x: auto;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
}

.table-container th,
.table-container td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.warning-record {
    transition: background-color 0.3s;
}

.warning-record:hover {
    background-color: #fafafa;
}

.warning-record.critical {
    background-color: rgba(255,77,79,0.05);
}

.warning-record.warning {
    background-color: rgba(250,173,20,0.05);
}

.warning-record.info {
    background-color: rgba(24,144,255,0.05);
}

.status-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-tag.critical {
    color: #ff4d4f;
    background: rgba(255,77,79,0.1);
}

.status-tag.warning {
    color: #faad14;
    background: rgba(250,173,20,0.1);
}

.status-tag.info {
    color: #1890ff;
    background: rgba(24,144,255,0.1);
}

.status-tag.unprocessed {
    color: #ff4d4f;
    background: rgba(255,77,79,0.1);
}

.status-tag.processing {
    color: #faad14;
    background: rgba(250,173,20,0.1);
}

.status-tag.resolved {
    color: #52c41a;
    background: rgba(82,196,26,0.1);
}

.warning-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.chart-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.chart-container {
    height: 300px;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 4px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    transition: all 0.3s;
}

.action-btn.primary {
    background: #1890ff;
    color: #fff;
}

.action-btn.warning {
    background: #faad14;
    color: #fff;
}

.action-btn:hover {
    opacity: 0.8;
}

.handler-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

.no-handler {
    color: #999;
}

.time-info {
    display: flex;
    flex-direction: column;
}

.primary-time {
    font-weight: 500;
}

.secondary-time {
    font-size: 12px;
    color: #999;
}

.warning-content {
    max-width: 300px;
}

.content-text {
    font-weight: 500;
}

.content-detail {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* 远程控制面板样式 */
.remote-control-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.control-section {
    margin-bottom: 24px;
}

.main-devices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.device-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
}

.device-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.device-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
}

.device-header h3 i {
    color: var(--primary-color);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-badge.running {
    background: rgba(82,196,26,0.1);
    color: #52c41a;
}

.status-badge.stopped {
    background: rgba(255,77,79,0.1);
    color: #ff4d4f;
}

.device-params {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

.param-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.param-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.param-value {
    font-size: 24px;
    font-weight: 500;
}

.parameter-control {
    width: 100%;
    height: 4px;
    background: #e1e1e1;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.parameter-control::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.parameter-control::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.parameter-control::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-color)) 0 0/var(--value-percent, 0%) 100% no-repeat #e1e1e1;
}

/* 设备控制按钮美化 */
.device-control-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    outline: none;
}

.device-control-btn.start {
    background: var(--primary-color);
    color: #fff;
}

.device-control-btn.stop {
    background: var(--danger-color);
    color: #fff;
}

.device-control-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.device-control-btn:active {
    transform: translateY(1px);
}

/* 滚动条美化 */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 施肥方案面板样式 */
.fertilizer-plan-panel {
    padding: 24px;
}

.plan-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.plan-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.plan-list {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 20px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.add-plan-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.add-plan-btn:hover {
    background: var(--primary-color-dark);
}

.plan-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.plan-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.plan-item.active {
    border-color: var(--primary-color);
    background: linear-gradient(to right, #fff, rgba(24,144,255,0.05));
}

.plan-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.plan-item-header h4 {
    margin: 0;
    color: var(--text-color);
}

.plan-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}

.plan-status.active {
    background: rgba(82,196,26,0.1);
    color: #52c41a;
}

.plan-status.pending {
    background: rgba(250,173,20,0.1);
    color: #faad14;
}

.plan-item-info {
    font-size: 14px;
}

.info-row {
    display: flex;
    margin-bottom: 8px;
}

.info-row .label {
    color: var(--text-secondary);
    width: 80px;
}

.info-row .value {
    color: var(--text-color);
}

.plan-details {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 24px;
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.detail-actions {
    display: flex;
    gap: 12px;
}

.edit-btn, .delete-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.edit-btn {
    background: var(--primary-color);
    color: #fff;
}

.delete-btn {
    background: var(--danger-color);
    color: #fff;
}

.edit-btn:hover, .delete-btn:hover {
    filter: brightness(1.1);
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    margin-bottom: 16px;
    color: var(--text-color);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item .label {
    color: var(--text-secondary);
    font-size: 14px;
}

.detail-item .value {
    color: var(--text-color);
    font-weight: 500;
}

.fertilizer-table {
    width: 100%;
    overflow-x: auto;
}

.fertilizer-table table {
    width: 100%;
    border-collapse: collapse;
}

.fertilizer-table th,
.fertilizer-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.fertilizer-table th {
    background: #fafafa;
    font-weight: 500;
}

.schedule-timeline {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    display: flex;
    gap: 20px;
    position: relative;
    padding-bottom: 24px;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 30px;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-point {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--primary-color);
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
}

.timeline-content h5 {
    margin: 0 0 8px 0;
    color: var(--text-color);
}

.timeline-content p {
    margin: 4px 0;
    color: var(--text-secondary);
}

.notes-content {
    background: #fafafa;
    border-radius: 8px;
    padding: 16px;
    color: var(--text-color);
}

.execution-history {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 24px;
    margin-top: 24px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.history-filter select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
}

.history-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
}

.history-chart {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    gap: 16px;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.history-time {
    color: var(--text-secondary);
    font-size: 14px;
    white-space: nowrap;
}

.history-info {
    flex: 1;
}

.history-title {
    margin-bottom: 8px;
}

.plan-name {
    font-weight: 500;
    color: var(--text-color);
}

.stage-name {
    margin-left: 8px;
    color: var(--text-secondary);
}

.history-details {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.status.completed {
    color: #52c41a;
}

.status.executing {
    color: #1890ff;
}

/* 滚动条美化 */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 智能化灌溉模块样式补充 */

/* 监控网格布局 */
.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 24px 0;
}

/* 监控卡片样式 */
.monitoring-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--card-shadow);
}

.monitoring-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.monitoring-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    margin: 0;
}

.monitoring-header h3 i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* 效果统计样式 */
.effect-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: block;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: block;
}

.stat-trend {
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.stat-trend.increase {
    color: #52c41a;
}

.stat-trend.decrease {
    color: #ff4d4f;
}

/* 决策面板样式 */
.decision-panel {
    background: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
}

.panel-section {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.panel-section:last-child {
    border-bottom: none;
}

.panel-section h3 {
    font-size: 16px;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
}

.panel-section h3 i {
    margin-right: 8px;
    color: var(--primary-color);
}

.decision-content {
    color: var(--text-secondary);
}

.decision-factor {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.decision-factor i {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--primary-color-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.suggestion-text {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.suggestion-detail {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-label {
    color: var(--text-secondary);
}

.priority {
    padding: 4px 8px;
    border-radius: 4px;
}

.priority.high {
    background: #fff1f0;
    color: #ff4d4f;
}

.improvement {
    color: #52c41a;
    font-weight: 500;
}

/* 控制面板样式 */
.control-panel {
    background: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 24px;
    padding: 20px;
    box-shadow: var(--card-shadow);
}

.mode-control {
    margin-bottom: 24px;
}

.mode-buttons {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.mode-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mode-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.execution-control {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.control-btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.control-btn.execute {
    background: var(--primary-color);
    color: white;
}

.control-btn.execute:hover {
    background: var(--primary-color-dark);
}

.control-btn.cancel {
    background: #ff4d4f;
    color: white;
}

.control-btn.cancel:hover {
    background: #cf1322;
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.advanced-control {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 16px;
}

.control-options {
    display: grid;
    gap: 16px;
    margin-top: 12px;
}

.control-option {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-option label {
    min-width: 120px;
    color: var(--text-secondary);
}

.control-option select,
.control-option input[type="range"] {
    flex: 1;
}

/* 历史记录样式 */
.history-section {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.history-section .section-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.history-section h3 {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-filter select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: transparent;
}

.history-table {
    padding: 0 20px 20px;
}

.history-table table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.history-table th {
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
}

.history-table tr:last-child td {
    border-bottom: none;
}

.status-tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-tag.success {
    background: #f6ffed;
    color: #52c41a;
}

.status-tag.warning {
    background: #fffbe6;
    color: #faad14;
}

.status-tag.normal {
    background: #e6f7ff;
    color: #1890ff;
}

/* 响应式布局 */
@media screen and (max-width: 768px) {
    .smart-overview {
        grid-template-columns: 1fr;
    }

    .monitoring-grid {
        grid-template-columns: 1fr;
    }

    .effect-stats {
        grid-template-columns: 1fr;
    }

    .suggestion-detail {
        grid-template-columns: 1fr;
    }

    .execution-control {
        flex-direction: column;
    }

    .history-table {
        overflow-x: auto;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.smart-irrigation-panel {
    animation: fadeIn 0.3s ease-out;
}

/* 图表加载动画 */
.chart-container {
    position: relative;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-secondary);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.chart-container.loading::before {
    opacity: 1;
    content: '加载中...';
}

/* 登录页面样式优化 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>') repeat;
    opacity: 0.1;
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    from { background-position: 0 0; }
    to { background-position: 100px 100px; }
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 40px;
    backdrop-filter: blur(10px);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.login-box:hover {
    transform: translateY(-5px);
}

.logo-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 12px rgba(24,144,255,0.3);
}

.login-header i {
    font-size: 40px;
    color: white;
}

.login-header h1 {
    font-size: 24px;
    color: #1f1f1f;
    margin: 0 0 8px;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin: 0 0 30px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.form-group label i {
    color: #1890ff;
    font-size: 16px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: white;
}

.input-wrapper input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.1);
    outline: none;
}

.input-focus-border {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #1890ff;
    transition: all 0.3s;
    transform: translateX(-50%);
}

.input-wrapper input:focus + .input-focus-border {
    width: calc(100% - 24px);
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    font-size: 16px;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #1890ff;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -8px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.remember-me input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #d9d9d9;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s;
}

.remember-me input[type="checkbox"]:checked + .checkbox-custom {
    background: #1890ff;
    border-color: #1890ff;
}

.remember-me input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: #1890ff;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: #40a9ff;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.login-btn:hover {
    background: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24,144,255,0.3);
}

.btn-hover-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-btn:hover .btn-hover-effect {
    width: 300px;
    height: 300px;
}

.login-footer {
    margin-top: 30px;
    text-align: center;
    color: #999;
    font-size: 12px;
}

.login-footer p {
    margin: 8px 0;
}

.copyright {
    color: #666;
}

.version-info {
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: rgba(255,255,255,0.6);
    font-size: 12px;
}

/* 错误提示样式优化 */
.error-message {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 4px;
    padding: 8px 12px;
    color: #ff4d4f;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.success-message {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 4px;
    padding: 8px 12px;
    color: #52c41a;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

/* 响应式优化 */
@media screen and (max-width: 480px) {
    .login-container {
        padding: 16px;
    }
    
    .login-box {
        padding: 24px;
    }
    
    .logo-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .login-header i {
        font-size: 30px;
    }
    
    .login-header h1 {
        font-size: 20px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* 登录动画效果 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.login-box {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message {
    color: #52c41a;
    font-size: 14px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: fadeIn 0.3s ease-out;
}

.success-message i {
    font-size: 14px;
}

.form-group.focused label {
    color: #1890ff;
}

/* 添加输入框动画效果 */
.form-group input {
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.form-group input:focus {
    transform: translateY(-1px);
}

/* 登录按钮动画 */
.login-btn {
    position: relative;
    overflow: hidden;
}

.login-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.login-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(100, 100);
        opacity: 0;
    }
}